<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for 指令</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">

    <button v-on:click="say('hi')"> say hi</button>
    <button v-on:click="say('hello')"> say hello</button>
</div>

<script>
    new Vue({
        el: '#app',
        data: {},
        methods:{
            say:function (message) {
                alert(message);
            }
        }
    })

</script>
</body>
</html>